<div class="inner-content-root">
  <div class="filter-box">
    <div class="search">
      <input type="text" [(ngModel)]="mobile" nz-input placeholder="手机号搜索"/>
    </div>
    <div class="search">
      <input type="text" [(ngModel)]="userId" nz-input placeholder="用户ID搜索"/>
    </div>
    <button class="btn" nz-button nzType="primary" (click)="queryDataInit()">搜索</button>
    <button class="btn" nz-button nzType="default" (click)="add()">添加</button>
  </div>
  <div class="content">
    <nz-table #basicTable
              nzBordered
              [nzData]="dataList"
              [(nzPageIndex)]="pageIndex"
              [(nzPageSize)]="pageSize"
              [nzFrontPagination]="false"
              [nzShowPagination]="true"
              [nzShowSizeChanger]="true"
              [nzLoading]="defaultHttpConfig.showLoading"
              [nzTotal]="pageTotal"
              (nzPageIndexChange)="queryData()"
              (nzPageSizeChange)="queryData()">
      <thead>
      <tr>
        <th>用户ID</th>
        <th>昵称</th>
        <th>手机号</th>
        <th>分销商户</th>
        <th>供应商</th>
        <th nzWidth="200px">分佣比例</th>
        <th>备注</th>
        <th>操作</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let data of basicTable.data">
        <td>{{data.userId}}</td>
        <td>{{data.nickname}}</td>
        <td>{{data.mobile}}</td>
        <td>{{data.cpsToStr}}</td>
        <td>{{data.cpsEpStr}}</td>
        <td>
          <input type="number" [(ngModel)]="data.userRate" nz-input/>
        </td>
        <td>
          <input type="text" [(ngModel)]="data.memo" nz-input/>
        </td>
        <td>
          <button nz-button nzType="link" (click)="save(data)">保存</button>
        </td>
      </tr>
      </tbody>
    </nz-table>
  </div>
</div>

